//
//  JXHComposeTextView.swift
//  JXHSinaWeiBo
//
//  Created by juxiaohui on 16/10/27.
//  Copyright © 2016年 juxiaohui. All rights reserved.
//

import UIKit
import SnapKit

class JXHComposeTextView: UITextView {

    lazy var placeHolderLabel : UILabel = UILabel()
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        setupUI()
    }
}

// MARK: - 设置UI
extension JXHComposeTextView {
    
    func setupUI() {
       
        addSubview(placeHolderLabel)
        
        placeHolderLabel.snp.makeConstraints { (make) in
            make.top.equalTo(self).offset(8)
            make.left.equalTo(self).offset(10)
        }
        
        placeHolderLabel.textColor = UIColor.lightGray
        placeHolderLabel.font = font
        placeHolderLabel.text = "分享新鲜事..."
        
        ///调整内边距
        textContainerInset = UIEdgeInsets.init(top: 7, left: 8, bottom: 0, right: 8)
        
    }
}



